﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="diskshare_form.aspx.cs"
    Inherits="AnyOffice.Web.general.system.netshare.diskshare_form" %>

<%@ Register Src="../../../Control/CheckRight.ascx" TagName="CheckRight" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>共享目录设置</title>
    <link rel="stylesheet" type="text/css" href="../../../module/date_selector/popcalendar.css" />
    <script type="text/javascript" src="../../../module/date_selector/popcalendar.js"></script>
    <script type="text/javascript" src="../../../core/function.js"></script>
    <script type="text/javascript">
        function CheckForm() {
            if (form1.txt_NDiskName.value == "") {
                alert("目录名称不能为空！");
                form1.txt_NDiskName.focus();
                return false;
            }
            if (form1.ddl_DiskTypeID.value == "") {
                alert("目录类型不能为空！");
                form1.ddl_DiskTypeID.focus();
                return false;
            }

            var pattern = new RegExp("[ ,\\`,\\%,\\*,\\\\,\\/,\\?,\\|,\\<,\\>,\\',\\:,\"]");
            if (pattern.test(form1.txt_NDiskName.value)) {
                alert("名称不能包含特殊字符,请重新输入!");
                return false;
            }

            if (form1.txt_Seq.value == "") {
                alert("排序号不能为空！");
                form1.txt_Seq.focus();
                return false;
            }
            var pattern2 = /^\s*[-\+]?\d+\s*$/;
            if (!pattern2.test(form1.txt_Seq.value)) {
                alert("排序号为整数,请重新输入!");
                return false;
            }
            return true;
        }

        function Backurl() {
            parent.menu_main.location = 'diskshare_list.aspx';
        }
    </script>
</head>
<body class="bodycolor" style="padding-top:0;">
    <form id="form1" runat="server">
     <div class="main_div">
    <table class="tab_pub" cellspacing="0" cellpadding="0" width="650" align="center" border="0">
        <tr>
            <td class="ta_bg">
                共享目录类型：<font color="red">*</font>
            </td>
            <td class="ta_txt">
                <asp:DropDownList ID="ddl_DiskTypeID" CssClass="BigInput" Width="147" runat="server"
                    DataTextField="DiskTypeName"  DataValueField="DiskTypeID">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="ta_bg">
                共享目录名称：<font color="red">*</font>
            </td>
            <td class="ta_txt">
                <asp:TextBox ID="txt_NDiskName" CssClass="BigInput" runat="server" MaxLength="200"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="ta_bg">
                排序号：<font color="red">*</font>
            </td>
            <td class="ta_txt">
                <asp:TextBox ID="txt_Seq" onchange="return CheckForm();" CssClass="BigInput" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="ta_bg">
                管理员：
            </td>
            <td class="ta_txt">
                <input id="MangerUser" type="hidden" name="MangerUser" runat="server" />
                <textarea class="BigStatic fl" id="txt_MangerUser" name="txt_MangerUser" rows="2" readonly="readOnly"
                    wrap="yes" cols="50" runat="server"></textarea>
                <input class="bnt_Add fl" style="width:46px; display:inline-table;" title="添加部门" onclick="user_select('MangerUser','txt_MangerUser','');"
                    type="button" name="button" value="添加" />
                <input class="bnt_Del fl" style="width:46px; display:inline-table;" title="清空部门" onclick="clear_double('MangerUser','txt_MangerUser');"
                    type="button" name="button" value="清空" />
            </td>
        </tr>
        <tr>
            <td class="ta_bg">
                <font class="topnav">查看部门：</font>
            </td>
            <td class="ta_txt">
                <input id="ReadDept" type="hidden"  runat="server" />
                <textarea class="BigStatic fl" id="txt_ReadDept" rows="2" readonly="readOnly"
                    wrap="yes" cols="50" runat="server"></textarea>
                <input class="bnt_Add fl" style="width:46px; display:inline-table;" title="添加部门" onclick="dept_select('ReadDept','txt_ReadDept','');"
                    type="button"  value="添加" />
                <input class="bnt_Del fl" style="width:46px; display:inline-table;" title="清空部门" onclick="clear_double('ReadDept','txt_ReadDept');"
                    type="button" name="btn_reddeptR" value="清空" />
            </td>
        </tr>
        <tr>
            <td class="ta_bg">
                <font class="topnav">查看角色：</font>
            </td>
            <td class="ta_txt">
                <input id="ToPriv" type="hidden" name="ToPriv" runat="server" />
                <textarea class="BigStatic fl" id="txt_RedRole" name="ToPrivName" rows="2" readonly="readOnly"
                    wrap="yes" cols="50" runat="server"></textarea>
                <input class="bnt_Add fl" style="width:46px; display:inline-table;" title="选择角色" onclick="priv_select('ToPriv','txt_RedRole','');"
                    type="button" name="button" value="添加" />
                <input class="bnt_Del fl" style="width:46px; display:inline-table;" title="清空角色" onclick="clear_double('ToPriv','txt_RedRole');"
                    type="button" name="button" value="清空" />
            </td>
        </tr>
        <tr>
            <td class="ta_bg">
                <font class="topnav">查看人员：</font>
            </td>
            <td class="ta_txt">
                <input id="ToUser" type="hidden" name="ToUser" runat="server" />
                <textarea class="BigStatic fl" id="txt_Reduser" name="txt_Reduser" rows="2" readonly="readOnly"
                    wrap="yes" cols="50" runat="server"></textarea>
                <input class="bnt_Add fl" style="width:46px; display:inline-table;" title="选择人员" onclick="user_select('ToUser','txt_Reduser','');"
                    type="button" name="button" value="添加" />
                <input class="bnt_Del fl" style="width:46px; display:inline-table;" title="清空人员" onclick="clear_double('ToUser','txt_Reduser');"
                    type="button" name="button" value="清空" />
            </td>
        </tr>
        <tr>
            <td class="ta_bg">
                <font class="topnav">下载部门：</font>
            </td>
            <td class="ta_txt">
                <input id="loadDept" type="hidden" name="loadDept" runat="server" />
                <textarea class="BigStatic fl" id="txt_loadDept" name="txt_loadDept" rows="2" readonly="readOnly"
                    wrap="yes" cols="50" runat="server"></textarea>
                <input class="bnt_Add fl" style="width:46px; display:inline-table;" title="添加部门" onclick="dept_select('loadDept','txt_loadDept','');"
                    type="button" id="btn_loaddept" value="添加" />
                <input class="bnt_Del fl" style="width:46px; display:inline-table;" title="清空部门" onclick="clear_double('loadDept','txt_loadDept');"
                    type="button" id="btn_loaddeptR" value="清空" />
            </td>
        </tr>
        <tr>
            <td class="ta_bg">
                <font class="topnav">下载角色：</font>
            </td>
            <td class="ta_txt">
                <input id="Loadrole" type="hidden" name="Loadrole" runat="server" />
                <textarea class="BigStatic fl" id="txt_LaodRole" name="txt_LaodRole" rows="2" readonly="readOnly"
                    wrap="yes" cols="50" runat="server"></textarea>
                <input class="bnt_Add fl" style="width:46px; display:inline-table;" title="选择角色" onclick="priv_select('Loadrole','txt_LaodRole','');"
                    type="button" name="button" value="添加" />
                <input class="bnt_Del fl" style="width:46px; display:inline-table;" title="清空角色" onclick="clear_double('Loadrole','txt_LaodRole');"
                    type="button" name="button" value="清空" />
            </td>
        </tr>
        <tr>
            <td class="ta_bg">
                <font class="topnav">下载人员：</font>
            </td>
            <td class="ta_txt">
                <input id="loaduser" type="hidden" name="loaduser" runat="server" />
                <textarea class="BigStatic fl" id="txt_loadUser" name="txt_loadUser" rows="2" readonly="readOnly"
                    wrap="yes" cols="50" runat="server"></textarea>
                <input class="bnt_Add fl" style="width:46px; display:inline-table;" title="选择人员" onclick="user_select('loaduser','txt_loadUser','');"
                    type="button" name="button" value="添加" />
                <input class="bnt_Del fl" style="width:46px; display:inline-table;" title="清空人员" onclick="clear_double('loaduser','txt_loadUser');"
                    type="button" name="button" value="清空" />
            </td>
        </tr>
        <tr align="center">
            <td colspan="2" class="bnt_con">
                <asp:Button ID="btnSave" runat="server" CssClass="BigButton" Text="确 定" OnClientClick="return CheckForm();"
                    OnClick="btnSave_Click" />
                <input class="BigButton" onclick="Backurl()" type="button" value="返 回" />
            </td>
        </tr>
    </table>
    <asp:HiddenField ID="hdd_diskid" runat="server" />
    <uc1:CheckRight ID="CheckRight1" runat="server" />
    </div>
    </form>
</body>
</html>
